home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / include / gdict-1.0 / gdict / gdict-source-loader.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-04-09  |  3.1 KB  |  80 lines

  1. /* gdict-source-loader.h - Source loader for Gdict
  2.  *
  3.  * Copyright (C) 2005  Emmanuele Bassi <ebassi@gmail.com>
  4.  *
  5.  * This library is free software; you can redistribute it and/or
  6.  * modify it under the terms of the GNU Library General Public
  7.  * License as published by the Free Software Foundation; either
  8.  * version 2 of the License, or (at your option) any later version.
  9.  *
  10.  * This library is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.  * Library General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU Library General Public
  16.  * License along with this library; if not, write to the
  17.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  18.  */
  19.  
  20. #ifndef __GDICT_SOURCE_LOADER_H__
  21. #define __GDICT_SOURCE_LOADER_H__
  22.  
  23. #include <glib-object.h>
  24. #include "gdict-source.h"
  25.  
  26. G_BEGIN_DECLS
  27.  
  28. #define GDICT_TYPE_SOURCE_LOADER        (gdict_source_loader_get_type ())
  29. #define GDICT_SOURCE_LOADER(obj)        (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDICT_TYPE_SOURCE_LOADER, GdictSourceLoader))
  30. #define GDICT_IS_SOURCE_LOADER(obj)        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDICT_TYPE_SOURCE_LOADER))
  31. #define GDICT_SOURCE_LOADER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GDICT_TYPE_SOURCE_LOADER, GdictSourceLoaderClass))
  32. #define GDICT_IS_SOURCE_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDICT_TYPE_SOURCE_LOADER))
  33. #define GDICT_SOURCE_LOADER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GDICT_TYPE_SOURCE_LOADER, GdictSourceLoaderClass))
  34.  
  35. typedef struct _GdictSourceLoader     GdictSourceLoader;
  36. typedef struct _GdictSourceLoaderClass     GdictSourceLoaderClass;
  37. typedef struct _GdictSourceLoaderPrivate GdictSourceLoaderPrivate;
  38.  
  39.  
  40. struct _GdictSourceLoader
  41. {
  42.   /*< private >*/
  43.   GObject parent_instance;
  44.   
  45.   GdictSourceLoaderPrivate *priv;
  46. };
  47.  
  48. struct _GdictSourceLoaderClass
  49. {
  50.   GObjectClass parent_class;
  51.   
  52.   void (*source_loaded) (GdictSourceLoader *loader,
  53.                GdictSource       *source);
  54.   
  55.   /* padding for future expansion */
  56.   void (*_gdict_source_1) (void);
  57.   void (*_gdict_source_2) (void);
  58.   void (*_gdict_source_3) (void);
  59.   void (*_gdict_source_4) (void);
  60. };
  61.  
  62. GType gdict_source_loader_get_type (void) G_GNUC_CONST;
  63.  
  64. GdictSourceLoader *    gdict_source_loader_new             (void);
  65. void                   gdict_source_loader_update          (GdictSourceLoader *loader);
  66. void                   gdict_source_loader_add_search_path (GdictSourceLoader *loader,
  67.                                 const gchar       *path);
  68. G_CONST_RETURN GSList *gdict_source_loader_get_paths       (GdictSourceLoader *loader);
  69. gchar **               gdict_source_loader_get_names       (GdictSourceLoader *loader,
  70.                                 gsize             *length) G_GNUC_MALLOC;
  71. G_CONST_RETURN GSList *gdict_source_loader_get_sources     (GdictSourceLoader *loader);
  72. GdictSource *          gdict_source_loader_get_source      (GdictSourceLoader *loader,
  73.                                 const gchar       *name);
  74. gboolean               gdict_source_loader_remove_source   (GdictSourceLoader *loader,
  75.                                 const gchar       *name);
  76.  
  77. G_END_DECLS
  78.  
  79. #endif /* __GDICT_SOURCE_LOADER_H__ */
  80.